package com.nemlistapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainMenuActivity extends Activity {
	
	Button openShoppingLists;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main_menu);
		
	}

	

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main_menu, menu);
		return true;
	}
	
	public void logOut(View view)
	{
		States states = States.getInstance().getPreferences(this);
		states.setToken(null);
		states.setUserName(null);
		states.setPreferences(this);
		
		Intent intent = new Intent(this, LoginActivity.class);
		startActivity(intent);		
	}

	public void openBlacklistActivity(View view)
	{
		Intent intent = new Intent(this, BlacklistActivity.class);
		startActivity(intent);	
	}
	
	public void openShoppingListsActivity(View view)
	{
		Intent intent = new Intent(this, ShoppingListsActivity.class);
		startActivity(intent);	
	}
}
